-
Notifications
You must be signed in to change notification settings - Fork 389
[FIRRTL] Make Domains ClassLike #9032
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
64f2628 to
f4d176c
Compare
9f28b09 to
76e8bbd
Compare
da4b15c to
071ea2b
Compare
76e8bbd to
bffc683
Compare
| ArrayRef<Attribute> DomainOp::getPortAnnotations() { return {}; } | ||
|
|
||
| void DomainOp::setPortAnnotationsAttr(ArrayAttr annotations) { | ||
| llvm_unreachable("domains do not support annotations"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider report fatal error instead? I don't know why this would be unreachable.
cc #3836 .
We don't want compilers being told this is unreachable, as that means anything reaching it is also "unreachable" and can to bizarre behaviors, like eliding branches/checks entirely knowing they lead to unreachable code.
OTOH that's exactly what it's good for.
I see that we do this for the ClassOp definitions, which hopefully is almost exactly a copy of :), so leaving it as-is is fine.
Since presumably it is presently unreachable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is all copied from the ClassOp definitions. I agree that this isn't great.
4ab6d85 to
39455de
Compare
8aede17 to
206c1e8
Compare
Change domains to behave almost exactly like classes. They now have input and outputs (which can be used by their existing bodies). This could alternatively be solved by using a simpler representation for domains. However, this would be better handled with a full cleanup of how classes are modeled. Signed-off-by: Schuyler Eldridge <[email protected]>
206c1e8 to
73f465c
Compare
Change domains to behave almost exactly like classes. They now have
input and outputs (which can be used by their existing bodies).
This could alternatively be solved by using a simpler representation for
domains. However, this would be better handled with a full cleanup of how
classes are modeled.
TODO:
LowerDomains. (64f2628)This is stacked on #8929.